<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.hengpeng.itfints.tools.PageUtil" %>
<%@include file="/page/common/public.jspf"%>
<% 
	PageUtil pageUtil = (PageUtil)request.getAttribute("PageUtil");
%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="${path }/favicon.ico" />
<link href="${skin }/theme.css" rel="stylesheet" type="text/css" />
<link href="${skin }/member.css" rel="stylesheet" type="text/css" />
<script src="${path }/js/common/jquery1.10.2.min.js"></script>
<script src="${path }/js/common/helper.js?v=${v}"></script>
<script src="${path }/js/common/cookie.js?v=${v}"></script>
<title>会员中心-投资记录</title>
<style type="text/css">
body{background:#F5F5F5;}
.logo_main_bor{box-shadow: 0px 2px 6px rgba(2, 0, 0, 0.1);}
</style>
</head>
<body>
<c:import url="../../include/head.jsp"></c:import>
<c:import url="../../include/logo_menu.jsp">
	<c:param name="type" value="index"></c:param>
</c:import>

<div class="youarehere">
	<div class="localtion"><a href="${path }/">首页</a> » 投资记录</div>
</div>

<div class="wrapper auto_height">
<c:import url="../left.jsp"></c:import>
<div class="bodyright l" style="width:778px;">
<div class="line_EAEAEA auto_height" style="background: #fff;margin-bottom: 20px;">
	<div style="padding: 12px">
		<div class="hkjh_top_ul1_li1div1">投资记录</div>
	</div>

	<div class="hkjh_top_ul1_li1div2 l">
		<div class="hkjh_hking">投资金额</div>
		<div class="hkjh_count"><fmt:formatNumber value="${account.totalInvestMoney/100 }" type="currency" pattern="￥.00"/>
		</div>
	</div>
	
	<div class="hkjh_top_ul1_li1div2 l">
		<div class="hkjh_hking">投资笔数</div>
		<div class="hkjh_count">${account.totalInvestNum eq null ? '0' : account.totalInvestNum }笔</div>
	</div>
	
	<div class="hkjh_top_ul1_li1div2 r" style="width: 230px;border-right:none;">
		<div class="hkjh_hking">已收益</div>
		<div class="hkjh_dslx"><fmt:formatNumber value="${account.totalIncomeMoney/100}" type="currency" pattern="￥.00"/>
		</div>
	</div>
</div>


<div class="line_EAEAEA auto_height" style="background: #fff;margin-bottom: 20px;">
<div style="padding: 12px">
	<div class="section query" style="display: ;">				
		<div class="thats">
			<div class="s_16">投资状态：</div>
			<input type="hidden" name="investInfoStatus" id="investInfoStatus" value="${investInfoStatus}"/>
			<c:choose> 
				 <c:when test="${investInfoStatus eq 'SUCESS'}"> 
				 	<span class="cllradio cllradio_sys"><a onclick="select('SUCESS')" href="javascript:void(0);" class="select"><i></i><em>已投标</em></a></span>
			      	<span class="cllradio cllradio_sys"><a onclick="select('LOANED')" href="javascript:void(0);" class="default"><i></i><em>回款中</em></a></span>
			        <span class="cllradio cllradio_sys"><a onclick="select('RETURNED')" lang="1" href="javascript:void(0);" class=default><i></i><em>已回款</em></a></span>
			     </c:when> 
			     <c:when test="${investInfoStatus eq 'RETURNED'}"> 
			     	<span class="cllradio cllradio_sys"><a onclick="select('SUCESS')" href="javascript:void(0);" class="default"><i></i><em>已投标</em></a></span>
			      	<span class="cllradio cllradio_sys"><a onclick="select('LOANED')" href="javascript:void(0);" class="default"><i></i><em>回款中</em></a></span>
			        <span class="cllradio cllradio_sys"><a onclick="select('RETURNED')" lang="1" href="javascript:void(0);" class=select><i></i><em>已回款</em></a></span>
			     </c:when> 
			     <c:when test="${investInfoStatus eq 'LOANED'}"> 
			     	<span class="cllradio cllradio_sys"><a onclick="select('SUCESS')" href="javascript:void(0);" class="default"><i></i><em>已投标</em></a></span>
			      	<span class="cllradio cllradio_sys"><a onclick="select('LOANED')"  href="javascript:void(0);" class="select"><i></i><em>回款中</em></a></span>
			        <span class="cllradio cllradio_sys"><a onclick="select('RETURNED')"  lang="1" href="javascript:void(0);" class=default><i></i><em>已回款</em></a></span>
			     </c:when> 
			     <c:otherwise> 
			     	<span class="cllradio cllradio_sys"><a onclick="select('SUCESS')" href="javascript:void(0);" class="default"><i></i><em>已投标</em></a></span>
			      	<span class="cllradio cllradio_sys"><a onclick="select('LOANED')"  href="javascript:void(0);" class="select"><i></i><em>回款中</em></a></span>
			        <span class="cllradio cllradio_sys"><a onclick="select('RETURNED')"  lang="1" href="javascript:void(0);" class=default><i></i><em>已回款</em></a></span>
			     </c:otherwise>
		    </c:choose>
		</div>
	</div>
</div>
	<ul class="account_item_title">
		<li style="text-align:center;width:96px;">标的名称</li>
		<li>年化率</li>
		<li>投资时间</li>
		<li>投资金额</li>
		<li>
			<c:choose> 
				 <c:when test="${investInfoStatus eq 'SUCESS'}">附加利率</c:when> 
			     <c:when test="${investInfoStatus eq 'RETURNED'}">已收本金</c:when> 
			     <c:when test="${investInfoStatus eq 'LOANED'}">待收本金</c:when> 
			     <c:otherwise>待收本金</c:otherwise>
		    </c:choose>
		</li>
		<li>
		    <c:choose> 
		    	 <c:when test="${investInfoStatus eq 'SUCESS'}">融资进度</c:when> 
			     <c:when test="${investInfoStatus eq 'RETURNED'}">已收利息</c:when> 
			     <c:when test="${investInfoStatus eq 'LOANED'}">待收利息</c:when> 
			     <c:otherwise>待收利息</c:otherwise>
		    </c:choose>
		</li>
		<li>状态</li>
		<li style="width:92px;text-align:center;">合同</li>
	</ul>
	<c:choose> 
	     <c:when test="${fn:length(myInvestList) > 0}"> 
	      		<c:forEach items="${myInvestList}" var="invest" begin="<%=pageUtil.getFromIndex()%>" end="<%=pageUtil.getToIndex() %>" varStatus="vstatus">
					<c:choose>
			            <c:when test="${vstatus.index%2 == 0}">
			  				<ul class="account_item_title2">
								<li style="text-align:center;width:96px;">
									<a href="javascript:void(0);" onclick="myreceiveplan('${invest.borrowInfoId}','${invest.investUserId}')" class="d_blue">
										<c:choose> 
										     <c:when test="${fn:length(invest.borrowName) > 6}"> 
										      	<c:out value="${fn:substring(invest.borrowName, 0, 6)}..." /> 
										     </c:when> 
										     <c:otherwise> 
										      	<c:out value="${invest.borrowName}" /> 
										     </c:otherwise>
									    </c:choose>
									</a>
								</li>
								<li>${invest.borrowRate}% </li>
								<li><fmt:formatDate value="${invest.investTime}" type="both" pattern="yyyy/MM/dd"/></li>
								<li><fmt:formatNumber value="${invest.investMoney/100}" type="currency" pattern="￥.00"/>
								</li>
								
								<li>
									<c:choose> 
										 <c:when test="${investInfoStatus eq 'SUCESS'}">
									     	${invest.rewardRate }%
									     </c:when>
									     <c:when test="${investInfoStatus eq 'RETURNED'}">
									     	<fmt:formatNumber value="${invest.receivedBaseMoney/100}" type="currency" pattern="￥.00"/>
									     </c:when> 
									     <c:when test="${investInfoStatus eq 'LOANED'}">
									     	<fmt:formatNumber value="${invest.unReceiveBaseMoney/100}" type="currency" pattern="￥.00"/>
									     </c:when> 
									     <c:otherwise>
									     	<fmt:formatNumber value="${invest.receivedBaseMoney/100}" type="currency" pattern="￥.00"/>
									     </c:otherwise>
								    </c:choose>
								</li>
								<li>
									<c:choose> 
										 <c:when test="${investInfoStatus eq 'SUCESS'}">
									     	${invest.raiseProgress}%
									     </c:when>
									     <c:when test="${investInfoStatus eq 'RETURNED'}">
									     	<fmt:formatNumber value="${invest.receivedInterestMoney/100}" type="currency" pattern="￥.00"/>
									     </c:when> 
									     <c:when test="${investInfoStatus eq 'LOANED'}">
									     	<fmt:formatNumber value="${invest.unReceiveInterestMoney/100}" type="currency" pattern="￥.00"/>
									     </c:when> 
									     <c:otherwise>
									     	<fmt:formatNumber value="${invest.receivedInterestMoney/100}" type="currency" pattern="￥.00"/>
									     </c:otherwise>
								    </c:choose>
								</li>
								<li>
									<c:choose> 
										 <c:when test="${investInfoStatus eq 'SUCESS'}">投标成功</c:when>
									     <c:when test="${investInfoStatus eq 'RETURNED'}">已回款</c:when> 
									     <c:when test="${investInfoStatus eq 'LOANED'}">回款中</c:when> 
									     <c:otherwise>回款中</c:otherwise>
								    </c:choose>					
								</li>
								<li style="width:92px;text-align:center;"><a href="#" class="d_blue">查看</a></li>
							</ul>
			            </c:when>
			            <c:otherwise>
			    			<ul class=account_item_title3>
								<li style="text-align:center;width:96px;">
									<a href="javascript:void(0);" onclick="myreceiveplan('${invest.borrowInfoId}','${invest.investUserId}')" class="d_blue">
										<c:choose> 
										     <c:when test="${fn:length(invest.borrowName) > 6}"> 
										      	<c:out value="${fn:substring(invest.borrowName, 0, 6)}..." /> 
										     </c:when> 
										     <c:otherwise> 
										      	<c:out value="${invest.borrowName}" /> 
										     </c:otherwise>
									    </c:choose>
									</a>
								</li>
								<li>${invest.borrowRate}%</li>
								<li><fmt:formatDate value="${invest.investTime}" type="both" pattern="yyyy/MM/dd"/></li>
								<li><fmt:formatNumber value="${invest.investMoney/100}" type="currency" pattern="￥.00"/>
								</li>
								
								<li>
									<c:choose>
									     <c:when test="${investInfoStatus eq 'SUCESS'}">
									     	${invest.rewardRate }%
									     </c:when> 
									     <c:when test="${investInfoStatus eq 'RETURNED'}">
									     	<fmt:formatNumber value="${invest.receivedBaseMoney/100}" type="currency" pattern="￥.00"/>
									     </c:when> 
									     <c:when test="${investInfoStatus eq 'LOANED'}">
									     	<fmt:formatNumber value="${invest.unReceiveBaseMoney/100}" type="currency" pattern="￥.00"/>
									     </c:when> 
									     <c:otherwise><fmt:formatNumber value="${invest.receivedBaseMoney/100}" type="currency" pattern="￥.00"/></c:otherwise>
								    </c:choose>
								</li>
								<li>
									<c:choose>
										 <c:when test="${investInfoStatus eq 'SUCESS'}">
									     	${invest.raiseProgress}%
									     </c:when>
									     <c:when test="${investInfoStatus eq 'RETURNED'}">
									     	<fmt:formatNumber value="${invest.receivedInterestMoney/100}" type="currency" pattern="￥.00"/>
									     </c:when> 
									     <c:when test="${investInfoStatus eq 'LOANED'}">
									     	<fmt:formatNumber value="${invest.unReceiveInterestMoney/100}" type="currency" pattern="￥.00"/>
									     </c:when> 
									     <c:otherwise><fmt:formatNumber value="${invest.receivedInterestMoney/100}" type="currency" pattern="￥.00"/></c:otherwise>
			  				        </c:choose>
								</li>
								<li>
									<c:choose> 
										 <c:when test="${investInfoStatus eq 'SUCESS'}">投标成功</c:when>
									     <c:when test="${investInfoStatus eq 'RETURNED'}">已回款</c:when> 
									     <c:when test="${investInfoStatus eq 'LOANED'}">回款中</c:when> 
									     <c:otherwise>回款中</c:otherwise>
								    </c:choose>
								</li>
								<li style="width:92px;text-align:center;"><a href="#" class="d_blue">查看</a></li>
							</ul>
			            </c:otherwise>
			        </c:choose>
				</c:forEach>  
	     </c:when> 
	     <c:otherwise> 
	      		<div class="s_13">
					<div style="line-height: 60px; font-size: 16px; text-align: center;">暂无投资记录</div>
				</div>
	     </c:otherwise>
    </c:choose>
	<div class="clearfix section"></div>
	
<div class="paginations">
	<div class="page-bottom">
	 	 
<!-- 	<a href="/article/201-1.htm" name="pagebar_frist" class="page-start"><span>首页</span></a>
		<a href="/article/201-1.htm" name="pagebar_pre" class="page-prev"><span>上一页</span></a>
		<span class="page-cur">1</span><a href="/article/201-2.htm">2</a><span class="page-break">...</span>
		<a name="pagebar_next" href="/article/201-2.htm" class="page-next"><span>下一页</span></a>
		<a name="pagebar_last" href="/article/201-84.htm" class="page-end"><span>末页</span></a>
		<span class="page-skip"><span style="margin-top: 2px;" class="inputcheckbox l">共3页 到第 <input type="text" id="pagebar_page_text" size="4" value="1">页</span>
		<button id="pagebar_go" type="button">确定</button></span>
		<br /> -->

		记录总数<%=pageUtil.getTotalCount()%>条 当前页/总页数<%=pageUtil.getCurrentPage()%> 
		/<%=pageUtil.getPageCount()%>每页显示<%=pageUtil.getPageSize()%>条 
		<a onclick="javascript:go(1);" href="javascript:void(0);" name="pagebar_frist" class="page-start"><span>首页</span></a> 
		<a onclick="javascript:go(<%=(pageUtil.getCurrentPage() - 1)%>);" href="javascript:void(0);" name="pagebar_pre" class="page-prev"><span>上一页</span></a> 
		<a onclick="javascript:go(<%=(pageUtil.getCurrentPage() + 1)%>);" href="javascript:void(0);" name="pagebar_next" class="page-next"><span>下一页</span></a> 
		<a onclick="javascript:go(<%=pageUtil.getPageCount()%>);" href="javascript:void(0);" name="pagebar_last" class="page-end"><span>末页</span></a> 
	</div>
</div>
        	
</div>
</div>
</div>
<script type="text/javascript">
	//分页
	function go (page) {
		window.location.href = "<%=request.getContextPath()%>/investInfo/myInvestList.htm?curPage="+page+"&investInfoStatus="+$("#investInfoStatus").val();
	}
	//状态查询
	function select (investInfoStatus) {
		window.location.href = "<%=request.getContextPath()%>/investInfo/myInvestList.htm?curPage=1&investInfoStatus="+investInfoStatus;
	}
	//查看收款计划
	function myreceiveplan (borrowInfoId, userId) {
		window.location.href = "<%=request.getContextPath()%>/repayment/myReceivePlanList.htm?borrowInfoId="+borrowInfoId+"&investUserId="+userId;
	}
</script>
<!-- 友情链接 -->
<c:import url="../../include/links.jsp"></c:import>

<!-- 版权所有 -->
<c:import url="../../include/copyright.jsp"></c:import>
</body>
</html>